package com.scitc.pleasurevideo.pojo;

import android.text.TextUtils;

import com.google.gson.annotations.Expose;

import java.io.Serializable;

public class PlayMenuTvVo implements Serializable {
    @Expose
    private String name;
    @Expose
    private String subtitle;
    @Expose
    private String imgUrl;
    @Expose
    private String playWebUrl;
    @Expose
    private String playM3u8Url;
    @Expose
    private String playMp4Url;
    @Expose
    private Integer playSetInt;
    @Expose
    private Integer allSet;
    @Expose
    private String director;
    @Expose
    private String protagonist;
    @Expose
    private Integer currentPosition;
    @Expose
    private Integer duration;

    public Integer getCurrentPosition() {
        if(currentPosition==null){
            return 0;
        }else if(currentPosition>10000){
            return currentPosition-10000;
        }
        return currentPosition;
    }

    public void setCurrentPosition(Integer currentPosition) {
        this.currentPosition = currentPosition;
    }

    public Integer getDuration() {
        return duration;
    }

    public void setDuration(Integer duration) {
        this.duration = duration;
    }

    public String getDirector() {
        return director;
    }

    public void setDirector(String director) {
        this.director = director;
    }

    public String getProtagonist() {
        return protagonist;
    }

    public void setProtagonist(String protagonist) {
        this.protagonist = protagonist;
    }

    public Integer getAllSet() {
        if(allSet==null){
            return 0;
        }
        return allSet;
    }

    public void setAllSet(Integer allSet) {
        this.allSet = allSet;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getSubtitle() {
        return subtitle;
    }

    public void setSubtitle(String subtitle) {
        this.subtitle = subtitle;
    }

    public String getImgUrl() {
        return imgUrl;
    }

    public void setImgUrl(String imgUrl) {
        this.imgUrl = imgUrl;
    }

    public String getPlayWebUrl() {
        if(TextUtils.isEmpty(playWebUrl)){
            return "0";
        }
        return playWebUrl;
    }

    public void setPlayWebUrl(String playWebUrl) {
        this.playWebUrl = playWebUrl;
    }

    public String getPlayM3u8Url() {
        if(TextUtils.isEmpty(playM3u8Url)){
            return "0";
        }
        return playM3u8Url;
    }

    public void setPlayM3u8Url(String playM3u8Url) {
        this.playM3u8Url = playM3u8Url;
    }

    public String getPlayMp4Url() {
        if(TextUtils.isEmpty(playMp4Url)){
            return "0";
        }
        return playMp4Url;
    }

    public void setPlayMp4Url(String playMp4Url) {
        this.playMp4Url = playMp4Url;
    }

    public Integer getPlaySetInt() {
        if(playSetInt==null||playSetInt<0){
            return 0;
        }
        return playSetInt;
    }

    public void setPlaySetInt(Integer playSetInt) {
        this.playSetInt = playSetInt;
    }

    @Override
    public String toString() {
        return "PlayMenuTvPojo{" +
                "name='" + name + '\'' +
                ", subtitle='" + subtitle + '\'' +
                ", imgUrl='" + imgUrl + '\'' +
                ", playWebUrl='" + playWebUrl + '\'' +
                ", playM3u8Url='" + playM3u8Url + '\'' +
                ", playMp4Url='" + playMp4Url + '\'' +
                ", playSetInt=" + playSetInt +
                ", allSet=" + allSet +
                ", director='" + director + '\'' +
                ", protagonist='" + protagonist + '\'' +
                ", currentPosition=" + currentPosition +
                ", duration=" + duration +
                '}';
    }
}
